/*
 * @Author: chichiksky
 * @Date: 2022-04-12 18:16:35
 * @LastEditTime: 2022-04-12 18:25:59
 * @LastEditors: your name
 * @Description: 
 * @FilePath: \web\src\assets\common\loading.js
 */
import React from "react";
import ReactDOM from "react-dom";
import { Spin } from 'antd';
const loading = {
  /**
   * 隐藏 loading
   * @method hide
   */
   hide: function () {
    document.getElementById('root').removeChild(document.getElementById('loading'));
  },
  /**
   * 显示 loading
   * @method show
   */
  show: function () {
    let dom = document.createElement('div');
    dom.setAttribute('id', 'loading');
    document.getElementById('root').appendchild(dom);
    ReactDOM.render( < Spin tip = "加载中..." size = "large" / > , dom);
  },
}
export default loading;

